package org.example.lang.tcf;

import lombok.extern.slf4j.Slf4j;

/**
 * @author : libo@juzishuke.com
 * @Title :
 * @Description :
 * @date : 2024/9/29 11:04
 * @since :1.0
 */
@Slf4j
public class FinallyTest {

    public static void main(String[] args) {
        String abc = test();
        log.info("abc: {}", abc);
    }

    public static String test() {
        try {
            return "abc";
        } catch (Exception e) {
            log.error("Exception in catch block", e);
//            return null;
        } finally {
            log.info("Finally block executed");
//            return "bcd";
        }
        return "bcd";
        //        log.info("After finally block executed");
    }
}
